package iscript.coreFramework.data.datatree 
{
	/**
	 * ...
	 * @author aaa
	 */
	public class DataTreeNodePath 
	{
			
		private var _nodes:Vector.<DataTreeNode> = new Vector.<DataTreeNode>();
           
		public function add(node:DataTreeNode):void {
			  _nodes.push(node);
			}
		 
		public function get	Nodes():Vector.<DataTreeNode>{ 
		         var nodesClone:Vector.<DataTreeNode> = new Vector.<DataTreeNode>();
				 for (var i:int = 0; i < _nodes.length; i++) {
					   nodesClone.push(_nodes[i]);
					 }
				 return  nodesClone.reverse();
			}
			
		public  function toString():String {			 
		      var path:String;			  
			  for (var i:int = 0; i < Nodes.length; i++) {
				     if (i == 0) {
						  path = DataTreeNode(Nodes[i]).Id;
				        }else {
					     path +="->"+DataTreeNode(Nodes[i]).Id;
					  }
		       }
			  return  path;
	     }
	}

}